import axios from 'axios'
const http = axios.create({
	baseURL: "http://m.mengxuegu.com/api/",
	timeout: 3000,
	headers: {
		'Content-Type': 'application/json; charset=utf-8'
	}
})
//请求拦截
http.interceptors.request.use(
	(config) => {
		return config
	},
	(error) => {
		Promise.reject(error)
	}
)
//响应拦截
http.interceptors.response.use((con) => {
	return con
}, (err) => {
	return Promise.reject(err)
})

export default http
